package com.dhsc.util;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.http.HttpServletRequest;
import java.util.Objects;

/**
 * @ClassName:  RequestHolder
 * @Description: 获取 HttpServletRequest
 * @date:   2023年6月27日 上午11:16:31       
 * @author: clong
 * @Copyright:  东海运营
 */
public class RequestHolder {

	public static HttpServletRequest getHttpServletRequest() {
        return ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest();
    }
	
	private RequestHolder(){
		 
	}
}
